<?php

	include("../config.php");
	include(INCLUDEDIR."core.php");
	
	db::Connect();
	
	//if(!isset($_GET['term'])) exit();
	$id = isset($_GET['id'])?intval($_GET['id']):0;
		
		
	$query = "	SELECT id_categoria_padre FROM categorias WHERE id_categoria = '$id'";

	$n = intval(db::getScalar($query));
	
	@mysql_close();
	
	echo(json_encode(array("id_categoria_padre" => $n)));
	
?>